package com.wn.demo06;

import java.util.function.BiPredicate;

/**
 * @author yellow Docter
 * @date 2024 -06-18
 * @desc 方法的引用
 *         类名::实例方法
 */
public class Demo03 {

    public static void main(String[] args) {

        BiPredicate<String, String> biP = (a, b) -> a.equals(b);
        boolean test = biP.test("ab", "abc");
        System.out.println("test = " + test);

        //方法的引用
        //类名调用实例方法  类名::实例方法
        BiPredicate<String, String> biP2 = String::equals;
        boolean test2 = biP.test("ab", "abc");
        System.out.println("test2 = " + test2);
    }

}
